package src.E_Thread;

public class E02_CreateThread_RunnableTest implements Runnable{
    private String url;
    private String name;
    public E02_CreateThread_RunnableTest(String url, String name){
        this.url = url;
        this.name = name;
    }

    @Override
    public void run() {
        new WebDownloader().downloader(url, name);
        System.out.println(name+" 下载成功！");
    }

    public static void main(String[] args) {
        E02_CreateThread_RunnableTest t1 = new E02_CreateThread_RunnableTest("https://img-blog.csdn.net/20150309140927553","src\\E_Thread\\1.jpg");
        E02_CreateThread_RunnableTest t2 = new E02_CreateThread_RunnableTest("https://img-blog.csdnimg.cn/20210512174955123.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ0NzE1OTQz,size_16,color_FFFFFF,t_70#pic_center","src\\E_Thread\\2.jpg");
        E02_CreateThread_RunnableTest t3 = new E02_CreateThread_RunnableTest("https://img-blog.csdnimg.cn/20210512175007490.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ0NzE1OTQz,size_16,color_FFFFFF,t_70#pic_center","src\\E_Thread\\3.jpg");
        new Thread(t1).start();
        new Thread(t2).start();
        new Thread(t3).start();
    }
}
